﻿//网格生成
//vesion 1.0
//author 夏天的树人
package org.summerTree.graphics
{

	public class Grid extends Base 
	{
		//*@菱形
		public static const DIAMOND:String="diamond";
		
		//*@正方形
		public static const RECT:String="rect";
		
		
		public function Grid()
		{

		}
		override public function clone():*
		{
			return new Grid();
		}
		
	    //创建网格
		/*rows 行
		 *cols 纵
		 *titleW 宽
		 *titleH 高度
		*/
		public function CreatGrid(rows :int,cols:int,titleW:int,titleH:int):void
		{
          this.graphics.lineStyle(1,color);
		  for (var i:int=0; i<rows; i++)
			{
				for (var j:int=0; j<cols ; j++)
				{					 
					this.graphics.drawRect(j*titleW,i*titleH,titleW,titleH);//绘制矩形
				}
			}

		}
		
		//获取单位格
		public function getTitleID(x:int,y:int):Number
		{
			return 0;
		}
		
		
		//public function clear():void
//		{
//			this.graphics.clear();
//		}
	}
}